﻿

	function saveLongHoliday(){
	   /*var stateDate =document.getElementById('editForm:txtStartdate').value;
	   if(stateDate==null||stateDate=='')
	   {
	     alert('请输入开始日期!');
		 return false;
	   }
	   var endDate =document.getElementById('editForm:txtendDate').value;
	   if(stateDate==null||stateDate=='')
	   {
	     alert('请输入结束日期!');
	     return false;
	   }
	   var startTime =document.getElementById('editForm:txtStartTime').value;
	   if(startTime==null||startTime=='')
	   {
	     alert('请输入开始时间!');
		 return false;
	   }
	   var endTime =document.getElementById('editForm:txtEndTime').value;
	   if(endTime==null||endTime=='')
	   {
	     alert('请输入结束时间!');
		 return false;
	   }
	   var holidayType =prmtHolidayType.value;
	   if(holidayType==null||holidayType=='')
	   {
	     alert('请输入假期类型!');
		 return false;
	   }
	   var holidayTypeId=encodeId(holidayType);
	   var jsonObject=new Object();
	   jsonObject.stateDate=stateDate;
	   jsonObject.endDate=endDate;
	   jsonObject.startTime=startTime;
	   jsonObject.endTime=endTime;
	   jsonObject.holidayTypeId=holidayTypeId;
	   var jsonString=Ext.encode(jsonObject);*/
	   closeWindow();
	   window.dialogArguments.addLongHolidayRowCall();
	}
	
	/**
	*用于转化ID 含有加好
	*/
	function encodeId(objId)
	{
		if(objId==null||objId==""){
			return objId;
		}else{
		 return objId.replace(/\+/g,'%2B');
		}
	}

	function closeWindow(){
		window.close();
	}